
#line 1 "ragel-guide-fig-5.2.rl"
#include <stdio.h>


#line 4 "ragel-guide-fig-5.2.rl"

// write statement can appear before a machine is fully defined

static const int foo_start = 1;
static const int foo_first_final = 3;
static const int foo_error = 0;

static const int foo_en_main = 1;

static const char _foo_nfa_targs[] = {
	0, 0
};

static const char _foo_nfa_offsets[] = {
	0, 0, 0, 0, 0
};

static const char _foo_nfa_push_actions[] = {
	0, 0
};

static const char _foo_nfa_pop_trans[] = {
	0, 0
};


#line 6 "ragel-guide-fig-5.2.rl"


int main(int argc, char** argv) {
	int cs, res = 0;
	if (argc > 1) {
		char *p = argv[1];
		
		{
			switch ( cs )
			{
				case 1:
				goto st_case_1;
				case 0:
				goto st_case_0;
				case 2:
				goto st_case_2;
				case 3:
				goto st_case_3;
			}
			goto st_out;
			st_case_1:
			if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
				goto st2;
			}
			{
				goto st0;
			}
			st_case_0:
			st0:
			cs = 0;
			goto _out;
			st2:
			p += 1;
			st_case_2:
			if ( ( (*( p))) == 0 ) {
				goto ctr2;
			}
			if ( 97 <= ( (*( p))) && ( (*( p))) <= 122 ) {
				goto st2;
			}
			{
				goto st0;
			}
			ctr2:
			{
				#line 14 "ragel-guide-fig-5.2.rl"
				res += 1; {p+= 1; cs = 3; goto _out;}  }
			
			goto st3;
			st3:
			p += 1;
			st_case_3:
			{
				goto st0;
			}
			st_out:
			
			_out: {}
		}
		
		#line 17 "ragel-guide-fig-5.2.rl"
		
	}
	printf("execute = %i\n", res);
	return 0;
}
